#ifndef REGISTERREQUESTMESSAGE_H
#define REGISTERREQUESTMESSAGE_H

#include "./entities/message/superClass/message.h"

/*
Json数据格式
{
    "messageType": [RegisterRequest](int)
    "email": [email](string)
    "nickname": [nickname](string)
    "password": [password](string)
}
*/
class RegisterRequestMessage : public Message
{
public:
    RegisterRequestMessage() = delete;

    RegisterRequestMessage(const Email& email, const Nickname& nickname, const Password& password);
    RegisterRequestMessage(const QJsonObject&);
    QJsonObject PackJsonData() const override;
    Email getEmail() const;
    Nickname getNickname() const;
    Password getPassword() const;

private:
    Email m_email;
    Nickname m_nickname;
    Password m_password;

};

// 编译时注册
Q_DECLARE_METATYPE(RegisterRequestMessage)

#endif // REGISTERREQUESTMESSAGE_H
